{% extends "main.html" %}
{% block title %}{{data.av_id}} {{data.title}} - {% endblock %}
{% block container %}
<div class="container">
    <h3>{{data.av_id}} {{data.title}}</h3>
    <div class="row movie">
        <div class="col-md-9 screencap">
            <a class="bigImage" href="{{cdn}}/digital/video{{data.bigimage}}" title="{{data.title}}">
                <img src="{{cdn}}/digital/video{{data.bigimage}}">
            </a>
        </div>
        <div class="col-md-3 info">
            <p>
                <span class="header">识别码:</span>
                {% if data.sub_id %}
                <span class="sub_title"><a href="http://163sub.org/LinkInfo/{{data.sub_id}}" target="_blank">字幕</a></span>
                {% endif %}
                <span class="like" data-type="av_id" data-val="{{data.av_id}}" style="color:#CC0000;">{{data.av_id}}</span>
            </p>
            {% if data.release_date %}
                <p>
                    <span class="header">发行时间:</span> {{data.release_date}}
                </p>
            {% endif %}
            {% if data.len %}
                <p>
                    <span class="header">长度:</span> {{data.len}}分钟
                </p>
            {% endif %}
            {% if data.director_url %}
                <p>
                    <span class="header">导演:</span>
                    <a class="like" data-type="director_url" data-val="{{data.director_url}}" href="/director/{{data.director_url}}">{{data.director}}</a>
                </p>
            {% endif %}
            {% if data.studio_url %}
                <p class="header">制作商: </p>
                <p>
                    <a class="like" data-type="studio_url" data-val="{{data.studio_url}}" href="/studio/{{data.studio_url}}">{{data.studio}}</a>
                </p>
            {% endif %}
            {% if data.label_url %}
                <p class="header">发行商: </p>
                <p>
                    <a class="like" data-type="label_url" data-val="{{data.label_url}}" href="/label/{{data.label_url}}">{{data.label}}</a>
                </p>
            {% endif %}
            {% if data.series_url %}
                <p class="header">系列:</p>
                <p>
                    <a class="like" data-type="series_url" data-val="{{data.series_url}}" href="/series/{{data.series_url}}">{{data.series}}</a>
                </p>
            {% endif %}
            {% if data.genre_list %}
            <p class="header">类别:</p>
            <p>
                 {% for item in data.genre_list %}
                    <span class="genre">
                        <a href="/genre/{{item}}">{{item}}</a>
                    </span>
                 {% endfor %}
            </p>
            {% endif %}
        </div>
    </div>

    <div class="visible-xs-block pt-10 text-center">
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iNzY4IiwibWluV2lkdGgiOmZhbHNlLCJ0aW1lem9uZSI6ZmFsc2UsImV4Y2x1ZGUiOmZhbHNlLCJkb21haW4iOmZhbHNlLCJjb2RlIjoiPGEgaHJlZj1cImh0dHBzOlwvXC9hdnhvLmNsdWJcL1wiIHRhcmdldD1cIl9ibGFua1wiPjxpbWcgc3JjPVwiXC9hcHBcL3dhdlwvVmlld1wvaW1nXC9iYW5uZXIuNjAweDEwMC5qcGdcIiB3aWR0aD1cIjMwMFwiIGhlaWdodD1cIjUwXCI+PFwvYT4ifV0=</div>
    </div>

    <style>
        a.solink:hover{
            color:#e2ff00;
        }
        .solink {
    width: 100px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    font-size: 17px;
    display: block;
    background: #60727d;
    color: #fff;
    border-radius: 10px;
    margin-left: 10px;
    margin-top: 10px;
    bottom: 106px;
    float: left;
        }
    </style>
    <h4>搜索资源</h4>
    <div class="row">
        <a class="solink" href="https://alicili8.com/list/{{data.av_id}}/1-0-0/" target="_blank">BT阿狸</a>
        <a class="solink" href="https://www.cltt3.xyz/search/{{data.av_id}}_ctime_1.html" target="_blank">磁力天堂</a>
        <a class="solink" href="http://www.sosobt5.com/s/{{data.av_id}}" target="_blank">sosobt5</a>
        <a class="solink" href="http://btfuliba.org/search/{{data.av_id}}/0-0-1.html" target="_blank">bt福利吧</a>
        <!-- <a class="solink" href="http://cililianbt.com/search/{{data.av_id}}/0/0/1.html" target="_blank">磁力链</a> -->
        <!-- <a class="solink" href="https://www.pushbtt.com/s/{{data.av_id}}" target="_blank">pushBT</a> -->
        <!-- <a class="solink" href="http://www.aicili.me/main-search-kw-{{data.av_id}}-1.html" target="_blank">爱磁力</a> -->
        <!-- <a class="solink" href="http://www.cilimao.me/search?word={{data.av_id}}" target="_blank">磁力猫</a> -->
        <a class="solink" href="https://torrentz2.eu/search?f={{data.av_id}}" target="_blank">Torrentz2</a>
        <!-- <a class="solink" href="https://btso.pw/search/{{data.av_id}}" target="_blank">btso.pw</a> -->
        <!-- <a class="solink" href="http://www.baocaibt.org/search/{{data.av_id}}/" target="_blank">BT包菜</a> -->
        <!-- <a class="solink" href="http://ciliba.net/word/{{data.av_id}}.html" target="_blank">磁力吧</a> -->
        <!-- <a class="solink" href="http://www.juzisousuo.com/word/{{data.av_id}}.html" target="_blank">BT橘子</a> -->
        <!-- <a class="solink" href="http://btfinder.com/main-search-kw-{{data.av_id}}-1.html" target="_blank">BTfinder</a> -->
        <!-- <a class="solink" href="https://zhongziso.com/list/{{data.av_id}}/1" target="_blank">种子搜</a> -->
        <!-- <a class="solink" href="https://www.btdalu.com/list/{{data.av_id}}/1/1/1" target="_blank">BT大陆</a> -->
        <!-- <a class="solink" href="http://www.163sub.org/Search?id={{data.av_id}}" target="_blank">163字幕</a> -->
        <a class="solink" href="http://assrt.net/sub/?searchword={{data.av_id}}" target="_blank">射手字幕</a>
        <a class="solink" href="http://subhd.com/search0/{{data.av_id}}" target="_blank">subhd字幕</a>
    </div>
    <!-- <h4>磁力链接</h4>
    <div class="row" id="GetMagnet">
        <a class="solink" href="javascript:GetMagnet('{{data.av_id}}');" style="background:#CC0000;">GET Magnet</a>
    </div> -->
    {% if data.magnet_data %}
    <h4>已有资源</h4>
    <div class="" style="padding:12px; margin-top:15px">
        <table id="magnet-table" class="table table-condensed table-striped table-hover" style="margin-bottom:0;">
            <tbody>
                <tr style="font-weight:bold;">
                    <td>磁力名稱 <span class="glyphicon glyphicon-magnet"></span></td>
                    <td style="text-align:center;white-space:nowrap">檔案大小</td>
                    <td style="text-align:center;white-space:nowrap">分享日期</td>
                </tr>
            </tbody>
            {% for item in data.magnet_data %}
            <tr onmouseover="this.style.backgroundColor='#F4F9FD';this.style.cursor='pointer';"
                onmouseout="this.style.backgroundColor='#FFFFFF'" height="35px"
                style="border-top: 1px solid rgb(221, 221, 221); background-color: rgb(255, 255, 255); cursor: pointer;">
                <td width="70%"
                    onclick="window.open('magnet:?xt=urn:btih:{{item.magnet_xt}}','_self')">
                    <a style="color:#333" rel="nofollow" title="滑鼠右鍵點擊並選擇【複製連結網址】"
                        href="magnet:?xt=urn:btih:{{item.magnet_xt}}">
                        DTT-030.mp4 </a>
                        {% if item.have_hd == 1 %}
                        <a class="btn btn-mini-new btn-primary disabled" title="包含高清HD的磁力連結">高清</a>
                        {% endif %}
                        {% if item.have_sub == 1 %}
                        <a class="btn btn-mini-new btn-warning disabled" title="包含字幕的磁力連結">字幕</a>
                        {% endif %}
                </td>
                <td style="text-align:center;white-space:nowrap"
                    onclick="window.open('magnet:?xt=urn:btih:{{item.magnet_xt}}','_self')">
                    <a style="color:#333" rel="nofollow" title="滑鼠右鍵點擊並選擇【複製連結網址】"
                        href="magnet:?xt=urn:btih:{{item.magnet_xt}}">{{item.magnet_type}} </a>
                </td>
                <td style="text-align:center;white-space:nowrap"
                    onclick="window.open('magnet:?xt=urn:btih:{{item.magnet_xt}}','_self')">
                    <a style="color:#333" rel="nofollow" title="滑鼠右鍵點擊並選擇【複製連結網址】"
                        href="magnet:?xt=urn:btih:{{item.magnet_xt}}">{{item.magnet_date}} </a>
                </td>
            </tr>
            {% endfor %}
        </table>
    </div>
    {% endif %}

    {% if data.stars_data %}
    <h4>演员</h4>
    <div id="avatar-waterfall">
        {% for item in data.stars_data %}
        <a data-type="stars_url" data-val="{{item.linkid}}" class="avatar-box like" href="/stars/{{item.linkid}}">
            <div class="photo-frame">
                {% if item.headimg %}
                <img src="{{cdn}}/{{item.headimg}}" title="">
                {% else %}
                <img src="{{cdn}}/mono/actjpgs/nowprinting.gif" title="">
                {% endif %}
            </div>
            <span>{{item.name}}</span>
        </a>
        {% endfor %}
    </div>
    {% endif %}

    <div class="clearfix"></div>
    {% if data.imglist %}
    <h4>样品图像</h4>
    <div id="sample-waterfall">
         {% for item in data.imglist %}
            <a class="sample-box" href="{{item.big}}" title="{{data.title}}">
                <div class="photo-frame">
                    <img src="{{item.small}}">
                </div>
            </a>
         {% endfor %}
    </div>
    {% endif %}
    <div class="clearfix"></div>

</div>
{% endblock %}

{% block pagination %}
{% endblock %}

{% block javascript %}
<script>
    $('.like').each(function () {
        $(this).after('<span title="收藏" class="glyphicon glyphicon-star-empty stars-btn" style="padding: 2px;color: #FFC107;"></span>');
    });
    
    $('.stars-btn').click(function(){
        var data_type = $($(this)[0].previousElementSibling).data('type');
        var data_val = $($(this)[0].previousElementSibling).data('val');
        $.get("/like/add/" + data_type + '/'+ data_val,function(data){
            $('#message_title').html(data);
            $('#message').modal('show');
        });
    });
</script>
{% endblock %}